package top.kpromise.user.utils;

import org.apache.commons.codec.digest.DigestUtils;

public class SecurityUtils {

    public static String md5(String text, String key) {
        return DigestUtils.md5Hex(text + key);
    }

    public static boolean verify(String text, String key, String md5) {
        String md5Text = md5(text, key);
        return md5Text.equalsIgnoreCase(md5);
    }
}
